package com.chrisgrimble.iftu.web;

public class CannedResponseWebServer {
    private WebServer webServer;

    public CannedResponseWebServer(String response) {
        this("/", response);
    }

    public CannedResponseWebServer(String path, String response) {
        this(path, 8080, response);

    }

    public CannedResponseWebServer(String path, int port, String response) {
        webServer = new WebServer(port, new WebServerMapping(path, new CannedResponseHandler(response)));
    }

    public void stop() {
        webServer.stop();
    }

}